package com.jyw.business.ast.domain.vo.web;

import com.jyw.business.ast.domain.AstConsumable;
import com.jyw.business.ast.domain.AstConsumableClaim;
import com.jyw.system.utils.ConversionUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@ApiModel("耗材详情")
@NoArgsConstructor
public class AstConsumableDetailVo {

    @ApiModelProperty("耗材信息")
    private AstConsumableVo consumable;

    @ApiModelProperty("申领记录")
    private List<AstConsumableClaimVo> claims;

    @ApiModelProperty("入库记录")
    private List<AstConsumableReserveRecordVo> warehouse;

    @ApiModelProperty("出库记录")
    private List<AstConsumableReserveRecordVo> outOfWarehouse;

    public AstConsumableDetailVo(AstConsumable consumable, List<AstConsumableClaimVo> claims, List<AstConsumableReserveRecordVo> warehouse, List<AstConsumableReserveRecordVo> outOfWarehouse) {
        setConsumable(ConversionUtil.conversion(new AstConsumableVo(consumable),AstConsumableVo.class));
        setClaims(claims);
        setWarehouse(warehouse);
        setOutOfWarehouse(outOfWarehouse);
    }
}
